Skip to content

fix: remove AZURE_RECORD_MODE override from Set-CliBuildVariables.ps1 - #7103

Merged
vhvb1989 merged 1 commit into
mainfrom
fix/remove-record-mode-override
Mar 13, 2026
Merged

fix: remove AZURE_RECORD_MODE override from Set-CliBuildVariables.ps1#7103
vhvb1989 merged 1 commit into
mainfrom
fix/remove-record-mode-override

Conversation

@vhvb1989

Copy link
Copy Markdown
Member

Problem

Manually triggered CI runs with AzureRecordMode=live still execute tests in playback mode (~30 min instead of ~2 hours).

Root Cause

eng/scripts/Set-CliBuildVariables.ps1 unconditionally sets AZURE_RECORD_MODE=playback as a pipeline variable (via ##vso[task.setvariable]) before the test task runs. This overrides the env: AZURE_RECORD_MODE value set on the test task from the AzureRecordMode pipeline parameter introduced in #6893.

Fix

Remove the AZURE_RECORD_MODE block from the script. The record mode is now fully controlled by the pipeline parameter chain:
release-cli.ymlbuild-and-test.ymlbuild-cli.yml

Fixes #7102

The script unconditionally set AZURE_RECORD_MODE=playback as a pipeline
variable before the test task runs, overriding the AzureRecordMode pipeline
parameter introduced in PR #6893. This caused manually triggered LIVE test
runs to still execute in playback mode.

The record mode is now fully controlled by the AzureRecordMode parameter
chain (release-cli.yml → build-and-test.yml → build-cli.yml).

Fixes #7102

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes a pipeline-variable override in Set-CliBuildVariables.ps1 that forced AZURE_RECORD_MODE=playback, ensuring CLI test record mode is controlled solely by the AzureRecordMode pipeline parameter chain (per #6893), fixing manual runs incorrectly executing in playback.

Changes:

  • Deleted the ##vso[task.setvariable] logic that set AZURE_RECORD_MODE to playback.
  • Added a clarifying comment pointing to the pipeline parameter flow that now controls AZURE_RECORD_MODE.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread eng/scripts/Set-CliBuildVariables.ps1
@vhvb1989
vhvb1989 enabled auto-merge (squash) March 13, 2026 01:07
@vhvb1989

Copy link
Copy Markdown
Member Author

/check-enforcer override

@vhvb1989
vhvb1989 merged commit a371607 into main Mar 13, 2026
6 checks passed
jongio pushed a commit to jongio/azure-dev that referenced this pull request Mar 18, 2026
…Azure#7103)

The script unconditionally set AZURE_RECORD_MODE=playback as a pipeline
variable before the test task runs, overriding the AzureRecordMode pipeline
parameter introduced in PR Azure#6893. This caused manually triggered LIVE test
runs to still execute in playback mode.

The record mode is now fully controlled by the AzureRecordMode parameter
chain (release-cli.yml → build-and-test.yml → build-cli.yml).

Fixes Azure#7102

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jongio pushed a commit to jongio/azure-dev that referenced this pull request Mar 27, 2026
…Azure#7103)

The script unconditionally set AZURE_RECORD_MODE=playback as a pipeline
variable before the test task runs, overriding the AzureRecordMode pipeline
parameter introduced in PR Azure#6893. This caused manually triggered LIVE test
runs to still execute in playback mode.

The record mode is now fully controlled by the AzureRecordMode parameter
chain (release-cli.yml → build-and-test.yml → build-cli.yml).

Fixes Azure#7102

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jongio pushed a commit to jongio/azure-dev that referenced this pull request Mar 27, 2026
…Azure#7103)

The script unconditionally set AZURE_RECORD_MODE=playback as a pipeline
variable before the test task runs, overriding the AzureRecordMode pipeline
parameter introduced in PR Azure#6893. This caused manually triggered LIVE test
runs to still execute in playback mode.

The record mode is now fully controlled by the AzureRecordMode parameter
chain (release-cli.yml → build-and-test.yml → build-cli.yml).

Fixes Azure#7102

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jongio pushed a commit to jongio/azure-dev that referenced this pull request Mar 27, 2026
…Azure#7103)

The script unconditionally set AZURE_RECORD_MODE=playback as a pipeline
variable before the test task runs, overriding the AzureRecordMode pipeline
parameter introduced in PR Azure#6893. This caused manually triggered LIVE test
runs to still execute in playback mode.

The record mode is now fully controlled by the AzureRecordMode parameter
chain (release-cli.yml → build-and-test.yml → build-cli.yml).

Fixes Azure#7102

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jongio pushed a commit to jongio/azure-dev that referenced this pull request Mar 27, 2026
…Azure#7103)

The script unconditionally set AZURE_RECORD_MODE=playback as a pipeline
variable before the test task runs, overriding the AzureRecordMode pipeline
parameter introduced in PR Azure#6893. This caused manually triggered LIVE test
runs to still execute in playback mode.

The record mode is now fully controlled by the AzureRecordMode parameter
chain (release-cli.yml → build-and-test.yml → build-cli.yml).

Fixes Azure#7102

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jongio pushed a commit to jongio/azure-dev that referenced this pull request Mar 27, 2026
…Azure#7103)

The script unconditionally set AZURE_RECORD_MODE=playback as a pipeline
variable before the test task runs, overriding the AzureRecordMode pipeline
parameter introduced in PR Azure#6893. This caused manually triggered LIVE test
runs to still execute in playback mode.

The record mode is now fully controlled by the AzureRecordMode parameter
chain (release-cli.yml → build-and-test.yml → build-cli.yml).

Fixes Azure#7102

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jongio pushed a commit to jongio/azure-dev that referenced this pull request Mar 27, 2026
…Azure#7103)

The script unconditionally set AZURE_RECORD_MODE=playback as a pipeline
variable before the test task runs, overriding the AzureRecordMode pipeline
parameter introduced in PR Azure#6893. This caused manually triggered LIVE test
runs to still execute in playback mode.

The record mode is now fully controlled by the AzureRecordMode parameter
chain (release-cli.yml → build-and-test.yml → build-cli.yml).

Fixes Azure#7102

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LIVE tests always run in playback mode due to Set-CliBuildVariables.ps1 overriding AZURE_RECORD_MODE

3 participants